home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C & C++ Multimedia Cyber Classroom
/
C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso
/
src
/
fig10_02.jar
/
Ch10
/
Fig10_02
/
Point1.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1997-10-28
|
293b
|
15 lines
// Fig. 10.2: point1.cpp
// Member function definitions for class Point
#include "point1.h"
Point::Point( int a, int b ) { setPoint( a, b ); }
void Point::setPoint( int a, int b )
{
x = a;
y = b;
}
void Point::print() const
{ cout << '[' << x << ", " << y << ']'; }